import request from '@/utils/request'
// 车型管理列表
export const getModelListApi = (params) => {
  return request({
    method: 'get',
    url: '/truckType/page',
    params
  })
}
// 车型类型
export const getModelApi = () => {
  return request({
    method: 'get',
    url: '/truckType/simple'
  })
}
// 删除车型
export const delModelApi = (id) => {
  return request({
    url: `/truckType/${id}`,
    method: 'DELETE'
  })
}

// 添加车型
export const addModelApi = (data) => {
  return request({
    url: '/truckType',
    method: 'POST',
    data
  })
}

// 车型数据回显
export const getModelInfoApi = (id) => {
  return request({
    url: `/truckType/${id}`,
    method: 'GET'
  })
}

// 编辑车型
export const editModelApi = (data) => {
  return request({
    url: `/truckType/${data.id}`,
    method: 'PUT',
    data
  })
}
